package com.nowcoder.community.actuator;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.stereotype.Component;

import java.util.Collections;

/**
 * @author szq
 * @create 2023-03-29 8:50
 * @description 配置 info
 */
@Component
public class AppInfoContributor implements InfoContributor {
    @Override
    public void contribute(Info.Builder builder) {
        builder.withDetail("msg", "info msg")
                .withDetail("name", "community")
                .withDetails(Collections.singletonMap("version", "2.0.0"));
    }
}
